package ar.pmt.vista.decoradores;

import org.displaytag.decorator.TableDecorator;

import ar.pmt.vista.beans.TareaVistaPmtBean;

public class ControlAvanceDecorator extends TableDecorator {

	public String getUid() {
		TareaVistaPmtBean bean = (TareaVistaPmtBean) getCurrentRowObject();
		if(bean.getCostoEstimado() > bean.getCostoReal()) {
			this.addRowClass().concat("class\" style='background-color: red;'");
		} else {
			if(bean.getCostoEstimado() < bean.getCostoReal()) {
				this.addRowClass().concat("class\" style='background-color: green;'");
			} else {
				this.addRowClass().concat("class\" style='background-color: yellow;'");
			}
		}
				
		return String.valueOf(bean.getUid());
	}
	
	public String getActividad() {
		TareaVistaPmtBean bean = (TareaVistaPmtBean) getCurrentRowObject();
		return bean.getActividad();
	}

	
	
}
